#ifndef MOTOR_H
#define MOTOR_H



#include "stm32f4xx.h"
#include "ALL_DEFINE.h"

#define RCC_PWM_GPIO  RCC_AHB1Periph_GPIOA|RCC_AHB1Periph_GPIOB
#define PWM_GPIOA_Pin  GPIO_Pin_6|GPIO_Pin_7
#define PWM_GPIOB_Pin  GPIO_Pin_0|GPIO_Pin_1




void Pwm_Config(uint32_t RCC_APB1Periph_TIMx,uint8_t GPIO_AF_TIMx,TIM_TypeDef* TIMx);
void Motor_Pwm(uint16_t MOTO1_PWM,uint16_t MOTO2_PWM,uint16_t MOTO3_PWM,uint16_t MOTO4_PWM,TIM_TypeDef* TIMx);
void Motor_off(void);
void Motor_Control(void);

void PWM_Cal(uint8_t mode);

#endif
